import React from 'react'
import mitt from '../funcCom/mitt.js'
import Ppp from './ppp'

export default class Pro extends React.Component{
    // constructor(){
    //     super()
    // }
    render(){
        return <div>
               <div>组件通信</div>
                <button onClick={ev=>{
                    mitt.emit('to',123) 
                    console.log(8888)} }> 通信</button>
                    <Ppp callback={this.bb}></Ppp>
            </div>
    }
    bb(num){
      console.log(num,'收到子组件信息')
    }
}